<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
            integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
            crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
            integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
            crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
            integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
            crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
    <div class="col">
        <form action="/filterChassis/" method="post">
            {% csrf_token %}
            <table class="table table-hover">
                <tbody>
                <tr>
                    <th>品牌</th>
                    <td>
                        <select class="custom-select" name="Brand">
                            <option selected value="">选择品牌</option>
                            <option value="航嘉">航嘉</option>
                            <option value="鑫谷">鑫谷</option>
                            <option value="aigo">aigo</option>
                            <option value="金河田">金河田</option>
                            <option value="先马">先马</option>
                            <option value="长城机电">长城机电</option>
                            <option value="Tt">Tt</option>
                            <option value="安钛克">安钛克</option>
                            <option value="海盗船">海盗船</option>
                            <option value="游戏悍将">游戏悍将</option>
                            <option value="至睿">至睿</option>
                            <option value="游戏帝国">游戏帝国</option>
                            <option value="超频三">超频三</option>
                            <option value="安耐美">安耐美</option>
                            <option value="Phanteks">Phanteks</option>
                            <option value="乔思伯">乔思伯</option>
                            <option value="华硕">华硕</option>
                            <option value="酷冷至尊">酷冷至尊</option>
                        </select>
                    </td>
                </tr>

                <tr>
                    <th>支持板型</th>
                    <td>
                        <select class="custom-select" name="Capacity">
                            <option selected value="">选择主板板型</option>
                            <option value="ATX">ATX（标准型）</option>
                            <option value="MATX">M-ATX（紧凑型）</option>
                            <option value="Mini-ITX板型">Mini-ITX（迷你型）</option>
                            <option value="E-ATX板型">E-ATX（加强型）</option>
                        </select>
                    </td>
                </tr>
                </tbody>
                <tr>
                    <td></td>
                    <th>
                        <button type="submit" class="btn btn-primary">筛选</button>
                    </th>
                </tr>

            </table>
        </form>
    </div>
    <div class="col">
        {% for case in cases %}
        <div class="card">
            <div class="card-body">
                <h5 class="card-title">{{case.Name}}</h5>
                <p class="card-text">支持板型:{{case.Capacity}}</p>
                <p class="card-text">价格:￥{{case.Price}}</p>
                <div class="btn-group" role="group" aria-label="Basic example">
                    <form action="/configReturnChassis/" method="post">
                        {% csrf_token %}
                        <input name="id" hidden="hidden" value="{{case.Name}}">
                        <button type="submit" class="btn btn-primary">添加到配置单</button>
                    </form>
                    <form action="/moreInfoChassis/" method="post">
                        {% csrf_token %}
                        <input name="id" hidden="hidden" value="{{case.Name}}">
                        <button type="submit" class="btn btn-primary">详细信息</button>
                    </form>
                </div>
            </div>
        </div>
        {% endfor %}
    </div>
</div>
</body>
</html>